<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<title></title>
</head>
<body>
	<a href="http://www.baidu.com">百度一下</a>
	<script type="text/javascript">
		let a = document.querySelector('a')


		a.addEventListener('click' function(ev){
			//阻止默认行为
			ev.preventDefault()
		})

		//禁用浏览器右键菜单
		document.oncontextmenu = function(ev){
			ev.preventDefault()
		}
	</script>
</body>
</html>